﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/naija.Master" CodeBehind="UploadProducts.aspx.vb" Inherits="WebApplication11.WebForm2" 
    title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:SqlDataSource ID="InsertProduct" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        DeleteCommand="DELETE FROM [Products] WHERE [ID] = ?" 
        InsertCommand="INSERT INTO [Products] ([ID], [StyleID], [CategoryID], [GenderID], [DesignerID], [EthnicID], [ProductName], [Description], [ProductDate], [ImageURL]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        SelectCommand="SELECT ID, CategoryID, StyleID, GenderID, DesignerID, EthnicID, ProductName, Description, ProductDate, ImageURL FROM Products" 
        UpdateCommand="UPDATE [Products] SET [StyleID] = ?, [CategoryID] = ?, [GenderID] = ?, [DesignerID] = ?, [EthnicID] = ?, [ProductName] = ?, [Description] = ?, [ProductDate] = ?, [ImageURL] = ? WHERE [ID] = ?">
        <DeleteParameters>
            <asp:Parameter Name="ID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="StyleID" Type="Int32" />
            <asp:Parameter Name="CategoryID" Type="Int32" />
            <asp:Parameter Name="GenderID" Type="Int32" />
            <asp:Parameter Name="DesignerID" Type="Int32" />
            <asp:Parameter Name="EthnicID" Type="Int32" />
            <asp:Parameter Name="ProductName" Type="String" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="ProductDate" Type="DateTime" />
            <asp:Parameter Name="ImageURL" Type="String" />
            <asp:Parameter Name="ID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="ID" Type="Int32" />
            <asp:Parameter Name="StyleID" Type="Int32" />
            <asp:Parameter Name="CategoryID" Type="Int32" />
            <asp:Parameter Name="GenderID" Type="Int32" />
            <asp:Parameter Name="DesignerID" Type="Int32" />
            <asp:Parameter Name="EthnicID" Type="Int32" />
            <asp:Parameter Name="ProductName" Type="String" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="ProductDate" Type="DateTime" />
            <asp:Parameter Name="ImageURL" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:FormView ID="FormView1" runat="server" DataKeyNames="ID" 
        DataSourceID="InsertProduct" DefaultMode="Insert" Width="329px">
        <EditItemTemplate>
            ID:
            <asp:Label ID="IDLabel1" runat="server" Text='<%# Eval("ID") %>' />
            <br />
            CategoryID:
            <asp:TextBox ID="CategoryIDTextBox" runat="server" 
                Text='<%# Bind("CategoryID") %>' />
            <br />
            StyleID:
            <asp:TextBox ID="StyleIDTextBox" runat="server" Text='<%# Bind("StyleID") %>' />
            <br />
            GenderID:
            <asp:TextBox ID="GenderIDTextBox" runat="server" 
                Text='<%# Bind("GenderID") %>' />
            <br />
            DesignerID:
            <asp:TextBox ID="DesignerIDTextBox" runat="server" 
                Text='<%# Bind("DesignerID") %>' />
            <br />
            EthnicID:
            <asp:TextBox ID="EthnicIDTextBox" runat="server" 
                Text='<%# Bind("EthnicID") %>' />
            <br />
            ProductName:
            <asp:TextBox ID="ProductNameTextBox" runat="server" 
                Text='<%# Bind("ProductName") %>' />
            <br />
            Description:
            <asp:TextBox ID="DescriptionTextBox" runat="server" 
                Text='<%# Bind("Description") %>' />
            <br />
            ProductDate:
            <asp:TextBox ID="ProductDateTextBox" runat="server" 
                Text='<%# Bind("ProductDate") %>' />
            <br />
            ImageURL:
            <asp:TextBox ID="ImageURLTextBox" runat="server" 
                Text='<%# Bind("ImageURL") %>' />
            <br />
            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                CommandName="Update" Text="Update" />
            &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                CausesValidation="False" CommandName="Cancel" Text="Cancel" />
        </EditItemTemplate>
        <InsertItemTemplate>
            CategoryID:
            <asp:TextBox ID="CategoryIDTextBox" runat="server" 
                Text='<%# Bind("CategoryID") %>' />
            <br />
            StyleID:
            <asp:TextBox ID="StyleIDTextBox" runat="server" Text='<%# Bind("StyleID") %>' />
            <br />
            GenderID:
            <asp:TextBox ID="GenderIDTextBox" runat="server" 
                Text='<%# Bind("GenderID") %>' />
            <br />
            DesignerID:
            <asp:TextBox ID="DesignerIDTextBox" runat="server" 
                Text='<%# Bind("DesignerID") %>' />
            <br />
            EthnicID:
            <asp:TextBox ID="EthnicIDTextBox" runat="server" 
                Text='<%# Bind("EthnicID") %>' />
            <br />
            ProductName:
            <asp:TextBox ID="ProductNameTextBox" runat="server" 
                Text='<%# Bind("ProductName") %>' />
            <br />
            Description:
            <asp:TextBox ID="DescriptionTextBox" runat="server" 
                Text='<%# Bind("Description") %>' />
            <br />
            ProductDate:
            <asp:TextBox ID="ProductDateTextBox" runat="server" 
                Text='<%# Bind("ProductDate") %>' />
            <br />
            ImageURL:
            <asp:TextBox ID="ImageURLTextBox" runat="server" 
                Text='<%# Bind("ImageURL") %>' />
            <br />
            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                CommandName="Insert" Text="Insert" />
            &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                CausesValidation="False" CommandName="Cancel" Text="Cancel" />
        </InsertItemTemplate>
        <ItemTemplate>
            ID:
            <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
            <br />
            CategoryID:
            <asp:Label ID="CategoryIDLabel" runat="server" 
                Text='<%# Bind("CategoryID") %>' />
            <br />
            StyleID:
            <asp:Label ID="StyleIDLabel" runat="server" Text='<%# Bind("StyleID") %>' />
            <br />
            GenderID:
            <asp:Label ID="GenderIDLabel" runat="server" Text='<%# Bind("GenderID") %>' />
            <br />
            DesignerID:
            <asp:Label ID="DesignerIDLabel" runat="server" 
                Text='<%# Bind("DesignerID") %>' />
            <br />
            EthnicID:
            <asp:Label ID="EthnicIDLabel" runat="server" Text='<%# Bind("EthnicID") %>' />
            <br />
            ProductName:
            <asp:Label ID="ProductNameLabel" runat="server" 
                Text='<%# Bind("ProductName") %>' />
            <br />
            Description:
            <asp:Label ID="DescriptionLabel" runat="server" 
                Text='<%# Bind("Description") %>' />
            <br />
            ProductDate:
            <asp:Label ID="ProductDateLabel" runat="server" 
                Text='<%# Bind("ProductDate") %>' />
            <br />
            ImageURL:
            <asp:Label ID="ImageURLLabel" runat="server" Text='<%# Bind("ImageURL") %>' />
            <br />
            <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" 
                CommandName="Edit" Text="Edit" />
            &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" 
                CommandName="Delete" Text="Delete" />
            &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" 
                CommandName="New" Text="New" />
        </ItemTemplate>
    </asp:FormView>
</asp:Content>
